package copyengine.ui.component.tabbar.animation
{
	import com.greensock.TweenLite;
	
	import copyengine.ui.component.tabbar.CETabBar;
	
	import flash.display.DisplayObject;
	import flash.display.MovieClip;

	public class CETabbarMoveBgAnimation implements ICETabBarAnimation
	{
		/**
		 * define how long the tween is.
		 */
		private static const TWEEN_TIME:Number = 0.3;

		private var scrollThumb:DisplayObject;
		private var target:CETabBar;

		public function CETabbarMoveBgAnimation()
		{
		}

		public function setTarget(_val:CETabBar, _uiAsset:MovieClip):void
		{
			target = _val;
			scrollThumb = _uiAsset["thumb"];
		}

		public function changeSelected(_selectedUniqueName:String):void
		{
//			var child:DisplayObject = target.getSubSelectableBtByUniqueName(_selectedUniqueName);
//			TweenLite.killTweensOf(scrollThumb, true);
//			TweenLite.to(scrollThumb, TWEEN_TIME, {x:child.x, y:child.y});
		}

		public function setDefaultSelectedTab(_selectedUniqueName:String):void
		{
			changeSelected(_selectedUniqueName);
		}

		public function dispose():void
		{
		}
	}
}